Use multi value remixers, composers, lyricists and arrangers#6487
Use multi value remixers, composers, lyricists and arrangers#6487
Conversation
|
Thank you for the PR! The changelog has not been updated, so here is a friendly reminder to check if you need to add an entry. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #6487 +/- ##
==========================================
+ Coverage 70.06% 70.10% +0.04%
==========================================
Files 147 147
Lines 18562 18588 +26
Branches 3026 3027 +1
==========================================
+ Hits 13005 13032 +27
Misses 4924 4924
+ Partials 633 632 -1
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
grug see PR move legacy single-string remixer over to multi-value remixers, like earlier genre -> genres move. grug see this touch library model, db migration, autotag info shim, and MusicBrainz extract, plus tests.
Changes:
- change item model field from
remixerto multi-valueremixers - add reusable
MultiValueFieldMigrationand newMultiRemixerFieldMigrationbackfill - add
Info/TrackInfo__setitem__shim to accept legacygenre/remixerstring sets and map into list fields
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
beets/library/models.py |
swap fixed field to remixers multi-value |
beets/library/migrations.py |
extract generic multi-value backfill migration + add remixer migration |
beets/library/library.py |
register new migration in library boot path |
beets/autotag/hooks.py |
add legacy setter shims for genre/remixer to list fields |
beetsplug/musicbrainz.py |
emit remixers as list, adjust merge fields to genres |
beets/dbcore/types.py |
tweak multi-value normalize to use model_type() |
test/autotag/test_hooks.py |
add tests for legacy string->list helper + update apply fixtures |
test/library/test_migrations.py |
add migration test for remixer->remixers backfill |
test/plugins/test_musicbrainz.py |
update remixer assertion to remixers list |
f089fae to
b68d61e
Compare
b68d61e to
75a76dd
Compare
75a76dd to
c40b990
Compare
5d7af33 to
60d7855
Compare
a0f6a09 to
22557ad
Compare
85969e8 to
c77ea75
Compare
## Add `lyricists`, `composers` and `arrangers` List Fields Converts the `lyricist` and `composer` scalar fields into `ListMediaField`-backed plural fields (`lyricists` and `composers`), following the same pattern used by `artists`, `albumartists`, `genres`, and `remixers`. The singular `lyricist` and `composer` fields are preserved as first-value convenience aliases via `.single_field()`. ### Changes - **`mediafile/__init__.py`**: Replaces `lyricist = MediaField(...)` with `lyricists = ListMediaField(...)` and `composer = MediaField(...)` with `composers = ListMediaField(...)`, using list-aware storage styles (`MP3ListStorageStyle`, `MP4ListStorageStyle`, `ListStorageStyle`) across all supported formats. `lyricist` and `composer` are retained as `lyricists.single_field()` and `composers.single_field()`. - **Tests**: Adds `LyricistListTestMixin` and `ComposerListTestMixin` with round-trip tests for list writes and first-value access. WMA-specific overrides handle the format's non-deterministic list ordering. `lyricists` and `composers` are added to the known-fields assertion. - **Docs/README**: Updates field enumeration examples and changelog entries to include `lyricists` and `composers` in the list of plural fields. These adjustments have been tested locally in combination with beetbox/beets#6487 See these tags on my Navidrome instance **Before** All artists are joined with a comma so Navidrome treats the entire combination as a single artist <img width="477" height="202" alt="image" src="https://github.com/user-attachments/assets/66692eb0-4f0c-43cb-816a-9a8a8995c920" /> **After** Each artist is separate <img width="477" height="198" alt="image" src="https://github.com/user-attachments/assets/e986a3e8-2bc6-4392-af32-d2b0b2a5819f" />
c77ea75 to
a95fea1
Compare
a95fea1 to
753c398
Compare
This update ensures that the remixers field is written to files.
753c398 to
809cbca
Compare
JOJ0
left a comment
There was a problem hiding this comment.
Mostly LGTM, except my bikeshedding of variable names (which I do find quite important though). I'm AFK for the rest of the day but might be able to look again tonight.
809cbca to
392962e
Compare
Migrate artist-credit fields to multi-value lists
This converts
remixer,lyricist,composer, andarrangerinto proper multi-value fields:remixers,lyricists,composers, andarrangers.What changed
beets/library/models.py): replaces the legacy single-stringremixer,lyricist,composer, andarrangerfields with multi-value list fields.beets/library/migrations.py,beets/library/library.py): extracts a reusableMultiValueFieldMigrationbase class and adds field-specific migrations forremixers,lyricists,composers, andarrangers.beets/autotag/hooks.py): centralizes legacy singular-to-plural compatibility inInfo/TrackInfo, so old assignments likeinfo.remixer = "..."still work and populate the new list fields.beetsplug/musicbrainz.py): now preserves these credits as lists instead of comma-joined strings.aura,bpd) to use the plural multi-value fields, and bumps the minimummediafileversion to0.16.0.Impact
DeprecationWarnings.genres.